package service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import pojo.User;
import service.UserMapperService;
import dao.UserMapper;

@Service
public class UserMapperServiceImpl implements UserMapperService {

	@Autowired
	private UserMapper userDao;	
	
	@Override
	public User getUserByLoginCodeandPassword(String loginCode, String password) {
		User user =null;
		user=userDao.getUserByLoginCode(loginCode);
		if(!user.getPassword().equals(password)){
			user=null;
		}
		return user;
	}

}
